home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Vault: The Gold Collection
/
Software Vault - The Gold Collection (American Databankers) (1993).ISO
/
cdr47
/
wasm223.zip
/
MOOT.DOC
< prev
next >
Wrap
Text File
|
1993-05-04
|
15KB
|
423 lines
Multiple Boot (Moot) Utility
by
Eric Tauck
1304 Deerpass Road
Marengo, IL 60152-9644
U.S.A.
Compuserve: 72457,1557
Internet: 72457.1557@compuserve.com
Moot is a program that allows you to install multiple boot con-
figurations using a single set of CONFIG.SYS and AUTOEXEC.BAT
files. Moot may work on DOS version 3 or later, but probably
requires version 4 or later. Moot has been successfully tested
on MS DOS 4.01 and MS DOS 5.00. IMPORTANT: before using Moot in
the CONFIG.SYS and AUTOEXEC.BAT files on your hard disk, you
should make sure Moot works on your system by testing Moot from a
floppy disk (rather than your hard disk).
The file MOOT.EXE is both a device driver and a program you can
run from the DOS command line (or usually from the AUTOEXEC.BAT
batch file). Commands are given to Moot by specifying them on
the command line. Multiple commands may be specified, though
some commands may not work properly together (like CHOOSE, LOAD,
and SKIP). The syntax for Moot in the CONFIG.SYS file is:
DEVICE=MOOT.EXE [[prompt] [switches] [command]] ...
The syntax for Moot in the AUTOEXEC.BAT file is:
MOOT [[prompt] [switches] [command]] ...
The prompt is a string, which consists of a sequence of charac-
ters surrounded by double quotes ("). Strings may contain the
following special two character sequences:
\" display quote character
\a sound speaker (audible)
\e embed escape character (ESC)
\f clear the screen (formfeed)
\g display "greater than" character (>)
\l display "less than" character (<)
\n start new display line (newline)
\p display "pipe" character (|)
All strings on the Moot command line are displayed (minus the
quotes) in the order they appear on the command line. Note that
Moot does not automatically start a new line after displaying a
string (unless you use the ECHO command). DOS usually converts
the CONFIG.SYS file into uppercase, so all Moot strings in the
CONFIG.SYS file will be in uppercase. From the the DOS command
line and batch files, the characters <, >, and | may be treated
as commands rather than characters to display, you may have to
use the special sequences described above to display these char-
acters. If the ANSI.SYS driver has been loaded (or loaded before
Moot in the CONFIG.SYS file), you can use the \e sequence to
embed ANSI commands in your Moot strings.
The following is a summary of the Moot switches and commands:
Switches:
/CASE enable case-sensitive keys
/DEFAULT=n set default selection to 'n'
/ECHO enable keystroke echo
/REMOVE remove driver after CHOOSE command
/SHOW=f display text file 'f'
/TIME=t set timeout value to 't'
Commands:
CHOICE return CHOOSE selection
CHOOSE select a block of CONFIG.SYS statements
CLEAR clear the screen
CLS clear the screen
ECHO s display string s
INPUT k ... input a keystroke
LINE start a new display line
LOAD optionally load a line
MOVE r c move the cursor to row r and column c
SKIP optionally skip a line
Switches on the command line affect all subsequent commands.
Some of the switches have no effect with some commands (e.g.
/TIME with the CLEAR command). Note that the /SHOW switch cannot
be used within CONFIG.SYS files.
The keystroke data for the CHOOSE and INPUT commands are either
the ASCII code of the key or the extended DOS code times 256 for
extended keys (like the function keys). Upper and lower case
letter keys are not distinguished from each other unless the
/CASE switch is used. The following are the keystroke values for
some common keys:
0 - 9 48 - 57
a - z 97 - 122
A - Z 65 - 90
F1 15104
F2 15360
F3 15616
F4 15872
F5 16128
F6 16384
F7 16640
F8 16896
F9 17152
F10 17408
ENTER 13
SPACE 32
ESC 27
The following is a complete description of each of the Moot
commands:
CHOOSE
------
The CHOOSE command allows you to select different blocks of
statements in the CONFIG.SYS file for processing. The syntax for
CHOOSE is:
DEVICE=MOOT.EXE [prompt] [switches] CHOOSE
DEVICE=#1 [prompt] key
:
<normal CONFIG.SYS statements>
:
DEVICE=#2 [prompt] key
:
<normal CONFIG.SYS statements>
:
DEVICE=#END
Up to 30 statement blocks may be specified, each with a number in
the range 1 to 99. The statement blocks do not have to be in the
order of their block number, for instance block #2 could come
before block #1. When the CHOICE command is executed from a
batch file, the block number selected in CONFIG.SYS file is
returned as an error code. The character sequences #1 to #99 and
#END can only be used as part of a CHOOSE command within the
CHOOSE statement blocks. The CHOOSE command can only be used
within the CONFIG.SYS file.
CLEAR
-----
The CLEAR command clears the screen using the color at the cursor
location and then moves the cursor to the upper left corner. The
syntax for CLEAR is:
DEVICE=MOOT.EXE CLEAR
or
MOOT CLEAR
CLS
---
The CLS command clears the screen using the color at the cursor
location and then moves the cursor to the upper left corner. The
syntax for CLS is:
DEVICE=MOOT.EXE CLS
or
MOOT CLS
This command is identical to the CLEAR command.
ECHO
----
The ECHO command displays a prompt string. The syntax for ECHO
is:
DEVICE=ECHO string
or
MOOT ECHO string
-----
string The string to display.
INPUT
-----
The INPUT command accepts a keystroke from the user and returns
an error code based on the keystroke. The syntax for INPUT is:
MOOT [prompt] [switches] INPUT key [key ...]
-----
key A keystroke to input. Multiple keystrokes may be speci-
fied and at least one keystroke is required. The error
code returned is based on the position of the keystroke on
the command line. The first keystroke returns error code
1, the second returns error code 2, etc.
Batch files can use the code returned by INPUT to branch to
specific locations in a batch file. The INPUT command can only
be used within batch files.
LINE
----
The LINE command echos a carriage return and linefeed combina-
tion, which starts a new display line. The syntax for LINE is:
DEVICE=MOOT.EXE LINE
or
MOOT LINE
LOAD
----
The LOAD command lets you selectively load or ignore the next
line in the CONFIG.SYS file. The syntax for LOAD is:
DEVICE=MOOT.EXE [prompt] [switches] LOAD
The LOAD command waits for the user to press 'Y' ("yes, load the
next line") or 'N' ("no, don't load the next line"). If a time-
out value is specified (/TIME), the default response is 'N'. The
LOAD command can only be used within the CONFIG.SYS file.
CHOICE
------
This CHOICE command returns the selection number (1 to 99) from
the last CHOOSE command. The syntax for CHOICE is:
MOOT CHOICE
CHOICE returns a code of 255 if there's an error or the Moot
driver isn't installed. Batch files can use the code returned by
CHOICE to branch to specific locations in a batch file. This
command can only be used within batch files. The CHOICE command
is executed by default if Moot is run without any command line
arguments.
MOVE
----
The MOVE command positions the cursor. The syntax for MOVE is:
DEVICE=MOOT.EXE MOVE row column
or
MOOT MOVE row column
-----
row is the screen row
column is the screen column
SKIP
----
The SKIP command lets you selectively skip or load the next line
in the CONFIG.SYS file. The syntax for SKIP is:
DEVICE=MOOT.EXE [prompt] [switches] SKIP
The SKIP command waits for the user to press 'Y' ("yes, skip the
next line") or 'N' ("no, don't skip the next line"). If a time-
out value is specified (/TIME), the default response is 'N'. The
SKIP command can only be used within the CONFIG.SYS file.
Examples
--------
Here are example CONFIG.SYS and AUTOEXEC.BAT files, which are
similar to the actual files I use on my system. Note that
MOOT.EXE is in the directory \UT.
My CONFIG.SYS has three basic configurations: standard, debug-
ging, and clean. The configuration is selected by pressing a
letter: 'S', 'D', or 'C'. The standard configuration is used
most of the time and is selected by default after four seconds.
The debugging configuration is similiar to my standard configura-
tion, except it does not load the EMM386 driver. The clean
configuration loads as little as possible for testing software
that may be incompatible with the device drivers and TSR's I
normally load.
CONFIG.SYS
----------
files=30
DEVICE=C:\UT\MOOT.EXE /time=3 CLS CHOOSE CLS
DEVICE=#1 "S)TANDARD\n" 83
DEVICE=C:\UT\MOOT.EXE ECHO "*** STANDARD BOOT ***"
buffers=8
device=c:\os\himem.sys
device=c:\os\emm386.exe i=e000-f000 noems
dos=high,umb
devicehigh=c:\nu\ncache.exe /ext=-1100
devicehigh=c:\bc\tdh386.sys
shell=c:\nu\ndos.com c:\nu /e:640u /a:256 /h:512 /u /p
DEVICE=#2 "D)EBUGGING\n" 68
DEVICE=C:\UT\MOOT.EXE ECHO "*** DEBUGGING BOOT ***"
buffers=8
device=c:\os\himem.sys
device=c:\nu\ncache.exe /ext=-1100
device=c:\bc\tdh386.sys -e1000
shell=c:\nu\ndos.com c:\nu /e:640 /a:256 /h:512 /p
DEVICE=#3 "C)LEAN\n" 67
DEVICE=C:\UT\MOOT.EXE ECHO "*** CLEAN BOOT ***"
buffers=30,8
shell=c:\os\command.com c:\os /p
DEVICE=#END
My AUTOEXEC.BAT reflects the three main configurations stored in
the CONFIG.SYS file. The first action performed is to run
MOOT.EXE to retrieve the configuration selection. For each
configuration in the CONFIG.SYS file, the AUTOEXEC.BAT branches
to a different location. My menu system is started by running
C:\UT\M, and at the end of this file a prompt is displayed and if
<ESC> is pressed within four seconds, my menu system is skipped.
If <SPACE> or <ENTER> is pressed, the menu system is entered
without waiting.
AUTOEXEC.BAT
------------
c:
\ut\moot
IF ERRORLEVEL 3 GOTO clean
IF ERRORLEVEL 2 GOTO debug
REM Standard Boot
:standard
lh \ut\autopark c: 3
lh \ut\mouse 2
set NDSHELL=/a:256 /h:512 /u /e+640u
GOTO configure
REM Debugging Boot
:debug
\ut\autopark c: 3
set NDSHELL=/a:256 /h:512 /e+640
GOTO configure
REM Clean Boot
:clean
path = c:\os;c:\ut;c:\nu
cd \misc
cls
GOTO byebye
REM Standard and Debugging Configuration
:configure
alias format=*format %%& /u
alias copy=*copy %%& /r
alias move=*move %%& /r
set DIRCMD=/o:u
set NU=c:\nu
path = c:\br;c:\bc;c:\ut;c:\nu;c:\os;c:\ws
REM Enter or Skip Menu System
\ut\moot "\nPress ESC to skip shell." /time=3 input 32 13 27
IF ERRORLEVEL 3 GOTO skip
c:\ut\m
REM Finished
:skip
cd \misc
cls
:byebye
DISCLAIMER OF WARRANTY
----------------------
THIS SOFTWARE AND MANUAL ARE DISTRIBUTED "AS IS" AND WITHOUT
WARRANTIES AS TO PERFORMANCE OF MERCHANTABILITY OR ANY OTHER
WARRANTIES WHETHER EXPRESSED OR IMPLIED. BECAUSE OF THE VARIOUS
HARDWARE AND SOFTWARE ENVIRONMENTS INTO WHICH THIS PROGRAM MAY BE
PUT, NO WARRANTY OF FITNESS FOR A PARTICULAR PURPOSE IS OFFERED.
GOOD DATA PROCESSING PROCEDURE DICTATES THAT ANY PROGRAM BE
THOROUGHLY TESTED WITH NON-CRITICAL DATA BEFORE RELYING ON IT.
THE USER MUST ASSUME THE ENTIRE RISK OF USING THE PROGRAM. ANY
LIABILITY OF THE SELLER WILL BE LIMITED EXCLUSIVELY TO PRODUCT
REPLACEMENT OR REFUND OF PURCHASE PRICE.